package com.fjnldx.mes.domain.domainRes;

import lombok.Data;
import org.springframework.stereotype.Component;

@Component
@Data
public class Results {
    private Integer code;
    private String msg;
    private String status;
    private Object data;
    private Object data2;
    private Object data3;

    public static Results success(Object data,Object data2) {
        return new Results(1, "操作成功", "success", data,data2);
    }

    public static Results success(Object data,Object data2,Object data3) {
        return new Results(1, "操作成功", "success", data,data2,data3);
    }

    public static Results error(String message) {
        return new Results(-1, "操作失败", "error", message,"");
    }

    public Results() {
    }

    public Results(Integer code, String msg, String status, Object data,Object data2) {
        this.code = code;
        this.msg = msg;
        this.status = status;
        this.data = data;
        this.data2 = data2;
    }

    public Results(Integer code, String msg, String status, Object data,Object data2,Object data3) {
        this.code = code;
        this.msg = msg;
        this.status = status;
        this.data = data;
        this.data2 = data2;
        this.data3 = data3;
    }


}
